{% extends "base.html" %}

{% block title %}gTest Flakiness - {% endblock %}

{% block content %}
<h1>gTest Flakiness</h1>
<table class="gtest-details">
  <tr>
    <th>Test Name</th>
    <th>Canonical Test Executable</th>
    <th>
      Total Flaky Failures (TTF) <br/>
      (fail and succeed in the same build)
    </th>
    <th>
      Total Successes (TS) <br/>
      (all successes in all builds)
    </th>
    <th>Flakiness<br/>TTF / (TTF + TS)</th>
  </tr>
  {% if results|length > 0 %}
  {% for result in results %}
  <tr>
    <td>{{ result.test_name }}</td>
    <td>{{ result.test_suite }}</td>
    <td>{{ result.num_flaky_failures }}</td>
    <td>{{ result.num_successes }}</td>
    <td>{{ result.flakiness|floatformat:2 }}</td>
  </tr>
  {% endfor %}
  {% else %}
  <tr>
    <td colspan="5">Yay! No flaky tests (or no data).</td>
  </tr>
  {% endif %}
</table>
{% endblock %}